Skip to main content
Version: 2.x.x

DispatcherOptionsType


import { DispatcherOptionsType } from "@hyper-fetch/core"

Description

Defined in dispatcher/dispatcher.types.ts:4

Preview

type DispatcherOptionsType = {
onClearStorage: (dispatcherInstance: Dispatcher) => void;
onDeleteFromStorage: <Command>(queueKey: string, data: DispatcherData<Command>) => void;
onInitialization: (dispatcherInstance: Dispatcher) => void;
onUpdateStorage: <Command>(queueKey: string, data: DispatcherData<Command>) => void;
storage: DispatcherStorageType;
}

Structure

{
onClearStorage: (dispatcherInstance: Dispatcher) => void;
onDeleteFromStorage: (queueKey: string, data: DispatcherData<Command>) => void;
onInitialization: (dispatcherInstance: Dispatcher) => void;
onUpdateStorage: (queueKey: string, data: DispatcherData<Command>) => void;
storage: {
clear: () => void;
delete: (key: string) => void;
get: (key: string) => DispatcherData<Command> | undefined;
keys: () => string[] | IterableIterator<string>;
set: (key: string, data: DispatcherData<Command>) => void;
};
}